﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace InvoiceProject.Models
{
    public class InvoiceCreateEditViewModel
    {
        public InvoiceCreateEditViewModel()
        {
          Invoice = new Invoice{InvoiceItems = new List<InvoiceItem>(), InvoiceDate = DateTime.Now};
            Invoice.InvoiceItems.Add(new InvoiceItem());
        }

        public InvoiceCreateEditViewModel(Invoice invoice )
        {
            Invoice = invoice;
        }


        public Invoice Invoice { get; set; }
        public InvoiceItem NewInvoiceItem { get; set; }


    }



}